import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    statistics: [],
  },
  mutations: {
    addStatistics(state, payload) {
      state.statistics.push(payload)
    },
  },
  actions: {
    addStatisticsTo({ state, commit }, payload) {
      commit('addStatistics', payload)
    },
  },
  modules: {},
})
